{include file="../header.tpl"}

<div class="container">

    <div class="content">
        <form action="/channel/insert" method="post">
            <fieldset>
                <div class="clearfix {if form_error('name')}error{/if}">
                    <input class="span12 {if form_error('name')}error{/if}" id="name" name="name" type="text"
                           placeholder="Naam" value="{set_value('name')}"/>
                {if form_error('name')}<span class="span12 help-block">{form_error('name')}</span>{/if}
                        <button type='submit' class="btn primary large span4 post-submit">Maak channel &raquo;</button>
                </div>
            </fieldset>
        </form>
    </div>

    <div class="row">
    {foreach from=$channels item=channel}
        <a class="span-one-third post-preview" href="/channel/view/{str_replace(',', '_', str_replace(' ', '-', $channel->getName()))}">
                <span class="post-preview-header"><p class='title'>{$channel->getName()}</p>
                </span>
        </a>
    {/foreach}

    </div>

{include file="../footer.tpl"}